import { effect } from '@vue/reactivity';
import Monster from "./Monster";
import { Skill } from "./Skill";

export class SkillMgr{

    skills:Skill[]
    ower:Monster
    nowSkill:Skill;
    constructor(ower:Monster,skillIds:number[]){
        this.ower = ower
        this.initSkills(skillIds)
    }
    initSkills(skillIds: number[]) {
        for (let i = 0; i < skillIds.length; i++) {
            const skillId = skillIds[i];
            let skill = new Skill(skillId, this.ower);

        }
    }

    releaseSkill() {
        //选择技能
        let skill = this.selectSkill()
        if(skill == null) return;

        //选择目标
        let targets = this.selectTarget(skill)
        //释放技能效果
        this.effectSkil(skill, targets)
    }
    effectSkil(skill: void, targets: void) {

    }
    selectTarget(skill: void) {

    }
    selectSkill() {
        for (let index = 0; index < this.skills.length; index++) {
            let ski = this.skills[index];

        }
    }
}